{% extends  'base.html' %}
        
{% block content %}

	<h1>{{uidp.name}}</h1>
	
	<p>Insira abaixo as informações sobre o novo relacionamento.</p>
	
	<form action="" method="post" id="rel_form" class='form'>
		<table>
			<tr>
				<td><label for="uidp_target">UIDP: </label></td>
				<td><select id="uidp_target" name="uidp_target">
					{% for u in uidps %}
						{% if uidp.id != u.id %}
							<option value="{{u.id}}">{{u.name}}</option>
						{% endif %}
					{% endfor %}
				</select></td>
			</tr>
			{{ form.as_table }}
		</table>

		{% ifequal action "edit" %}
			<input type="button" value="Editar" class="button" id="edit_rel_button"/>
		{% else %}
			<input type="button" value="Adicionar" class="button" id="new_rel_button"/>
		{% endifequal %}
		<a href="/collections/{{collection.id}}/uidps/{{uidp.id}}" ><input type="button" value="Cancelar" class="button" id="cancel_button"/></a>
		
	</form>

{% endblock %}